<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>运行时配置</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="tokyo-tyrant.installation.html">安装</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="tokyo-tyrant.resources.html">资源类型</a></div>
 <div class="up"><a href="tokyo-tyrant.setup.html">安装／配置</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="tokyo-tyrant.configuration" class="section">
 <h2 class="title">运行时配置</h2>
 <p class="simpara">
这些函数的行为受 <var class="filename">php.ini</var> 中的设置影响。
</p>
 <p class="para">
  <table class="doctable table">
   <caption><strong>tokyo_tyrant 配置选项</strong></caption>
   
    <thead>
     <tr>
      <th>名字</th>
      <th>默认</th>
      <th>可修改范围</th>
      <th>更新日志</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td><a href="tokyo-tyrant.configuration.html#ini.tokyo-tyrant.default-timeout" class="link">tokyo_tyrant.default_timeout</a></td>
      <td>2.0</td>
      <td>PHP_INI_ALL</td>
      <td></td>
     </tr>

     <tr>
      <td><a href="tokyo-tyrant.configuration.html#ini.tokyo-tyrant.session-salt" class="link">tokyo_tyrant.session_salt</a></td>
      <td><strong><code>NULL</code></strong></td>
      <td>PHP_INI_ALL</td>
      <td></td>
     </tr>

     <tr>
      <td><a href="tokyo-tyrant.configuration.html#ini.tokyo-tyrant.key-prefix" class="link">tokyo_tyrant.key_prefix</a></td>
      <td><strong><code>NULL</code></strong></td>
      <td>PHP_INI_ALL</td>
      <td></td>
     </tr>

     <tr>
      <td><a href="tokyo-tyrant.configuration.html#ini.tokyo-tyrant.allow-failover" class="link">tokyo_tyrant.allow_failover</a></td>
      <td>1</td>
      <td>PHP_INI_ALL</td>
      <td></td>
     </tr>

     <tr>
      <td><a href="tokyo-tyrant.configuration.html#ini.tokyo-tyrant.fail-threshold" class="link">tokyo_tyrant.fail_threshold</a></td>
      <td>5</td>
      <td>PHP_INI_ALL</td>
      <td></td>
     </tr>

     <tr>
      <td><a href="tokyo-tyrant.configuration.html#ini.tokyo-tyrant.health-check-divisor" class="link">tokyo_tyrant.health_check_divisor</a></td>
      <td>1000</td>
      <td>PHP_INI_ALL</td>
      <td></td>
     </tr>

     <tr>
      <td><a href="tokyo-tyrant.configuration.html#ini.tokyo-tyrant.php-expiration" class="link">tokyo_tyrant.php_expiration</a></td>
      <td>0</td>
      <td>PHP_INI_ALL</td>
      <td></td>
     </tr>

</tbody>
   
  </table>

 </p>

 <p class="para">这是配置指令的简短说明。</p>

 <p class="para">
  <dl>

   
     <dt id="ini.tokyo-tyrant.default-timeout">
      <em><code class="parameter">tokyo_tyrant.default_timeout</code></em>
      <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
     </dt>

     <dd>

      <p class="para">
       Default timeout when connecting to databases
      </p>
     </dd>

    
    
     <dt id="ini.tokyo-tyrant.session-salt">
      <em><code class="parameter">tokyo_tyrant.session_salt</code></em>
      <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
     </dt>

     <dd>

      <p class="para">
       The secret that is used to salt session id
      </p>
     </dd>

    
    
     <dt id="ini.tokyo-tyrant.key-prefix">
      <em><code class="parameter">tokyo_tyrant.key_prefix</code></em>
      <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
     </dt>

     <dd>

      <p class="para">
       Prefix all keys with this string. The prefix is transparent
       to the developer but helps making sure that keys won&#039;t collide if multiple
       applications are using the same database.
      </p>
     </dd>

    
    
     <dt id="ini.tokyo-tyrant.allow-failover">
      <em><code class="parameter">tokyo_tyrant.allow_failover</code></em>
      <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
     </dt>

     <dd>

      <p class="para">
       Whether to allow session failover in case a server dies.
      </p>
     </dd>

    
    
     <dt id="ini.tokyo-tyrant.fail-threshold">
      <em><code class="parameter">tokyo_tyrant.fail_threshold</code></em>
      <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
     </dt>

     <dd>

      <p class="para">
       How many read/write or connection failures is allowed
       before server is marked as failed.
      </p>
     </dd>

    
    
     <dt id="ini.tokyo-tyrant.health-check-divisor">
      <em><code class="parameter">tokyo_tyrant.health_check_divisor</code></em>
      <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
     </dt>

     <dd>

      <p class="para">
       Defines the divisor for the health check probability. If there are failed
       servers and the probability matches, the servers are health checked and
       in case the server seems healthy, it will be added back to the pool.
      </p>
     </dd>

    
    
     <dt id="ini.tokyo-tyrant.php-expiration">
      <em><code class="parameter">tokyo_tyrant.php_expiration</code></em>
      <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
     </dt>

     <dd>

      <p class="para">
       Whether to use built in session expiration mechanism or delegate 
       the expiration to a lua-script on the server-side.
      </p>
     </dd>

    

  </dl>

 </p>
</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="tokyo-tyrant.installation.html">安装</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="tokyo-tyrant.resources.html">资源类型</a></div>
 <div class="up"><a href="tokyo-tyrant.setup.html">安装／配置</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
